﻿<Window x:Class="Client.Windows.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:converters="clr-namespace:Client.Converters"
        Height="800" Width="1024" 
        Background="{StaticResource LightSideBackground}"
        WindowStartupLocation="CenterScreen">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary  Source="pack://application:,,,/Client;component/Resources/Resources.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <converters:TitleConverter x:Key="titleConverter"/>
        </ResourceDictionary>
    </Window.Resources>

    <Window.Title>
        <Binding Path="CurrentPageViewModel.Name" Converter="{StaticResource titleConverter}"/>
    </Window.Title>
    <DockPanel>
        
        <Grid>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
        <ListBox DockPanel.Dock="Left" Grid.Column="0"
                 Width="Auto" 
                 BorderThickness="0"
                 ItemsSource="{Binding PageViewModels}"
                 IsSynchronizedWithCurrentItem="True"
                 ItemTemplate="{DynamicResource listBoxTemplate}"
                 Background="Transparent"/>

        <ContentControl Grid.Column="1" Grid.ColumnSpan="3" Content="{Binding CurrentPageViewModel}" HorizontalAlignment="Stretch"/>
        </Grid>
    </DockPanel>

</Window>
